package com.neo4j.neo4jService;

import com.neo4j.neo4jDao.RelationShipRepository;
import com.neo4j.node.RelationShip;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RelationShipService {

    @Autowired
    private RelationShipRepository relationShipRepository;

    public Iterable<RelationShip> saveAll(List<RelationShip> depts) {
        return relationShipRepository.saveAll(depts);
    }

    public void deleteById(Long id) {
        relationShipRepository.deleteById(id);
    }

    public void deleteAll() {
        relationShipRepository.deleteAll();
    }

    public List<RelationShip> findByTitle(String title) {
        return relationShipRepository.findByTitle(title);
    }
}